package com.dak.robot.Service.Impl;

import com.dak.robot.Dao.AdminDao;
import com.dak.robot.Entity.Admin;
import com.dak.robot.Service.AdminService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Resource
    private AdminDao adminDao;

    @Override
    public int deleteByAdminId(Long qqid) {
        return adminDao.deleteByPrimaryKey(qqid);
    }

    @Override
    public int insertAdmin(Long qqid) {
        return adminDao.insert(qqid);
    }

    @Override
    public boolean checkInOrNotForAdmin(Long qqid) {
        return adminDao.selectOne(qqid)>0;
    }

    @Override
    public List<Long> selectAllAdmin() {
        return adminDao.selectAll();
    }
}
